package cn.getech.data.development.constant;


import lombok.Getter;

/**
 * @author zenith
 * @Description 所有数据库的枚举
 */
@Getter
public enum VirtualTypeEnum {

    VIRTUAL_DEF(1,"def","ROUTE_DEF"),
    VIRTUAL_SUM(2,"sum","ROUTE_SUM"),
    VIRTUAL_SUM_END(3,"sumEnd","ROUTE_SUM_END"),
    VIRTUAL_NULL(4,"null","NULL_RUN");

    VirtualTypeEnum(Integer id, String name, String type) {
        this.id = id;
        this.name = name;
        this.type = type;
    }

    private Integer id;
    private String name;
    private String type;


    public static VirtualTypeEnum ObjOf(String type) {
        if (type == null) {
            return null;
        } else {
            for (VirtualTypeEnum s : VirtualTypeEnum.values()) {
                if (s.getType() == type) {
                    return s;
                }
            }
            return null;
        }
    }
}
